execute if entity @a[scores={charge_spell21=0..10}] run clear @a minecraft:brown_dye{spell21:1b}


execute if entity @a[scores={charge_spell21=10}] run 

execute if entity @a[scores={charge_spell21=9}] run 

execute if entity @a[scores={charge_spell21=8}] run 

execute if entity @a[scores={charge_spell21=7}] run 

execute if entity @a[scores={charge_spell21=6}] run 

execute if entity @a[scores={charge_spell21=5}] run 

execute if entity @a[scores={charge_spell21=4}] run 

execute if entity @a[scores={charge_spell21=3}] run 

execute if entity @a[scores={charge_spell21=2}] run 

execute if entity @a[scores={charge_spell21=1}] run 

execute if entity @a[scores={charge_spell21=0}] run 


execute if entity @a[scores={charge_spell21=0}] run execute at @a run playsound minecraft:tota.custom.charges master @a ~ ~ ~ 1 1
execute if entity @a[scores={charge_spell21=0}] run tellraw @a {"text":"Out of charges!","color":"#5C0000","bold":false,"italic":true}



execute if entity @a[scores={charge_spell21=1..10}] run scoreboard players remove @a mana 1000
execute if entity @a[scores={charge_spell21=1..10}] run scoreboard players remove @a charge_spell21 1
